//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "adminActions\fn_preinit.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

GVAR(MarkerMode) = false;
GVAR(TeleportMode) = false;
GVAR(GhostMode) = false;

GVAR(MarkerAction) = -1;
GVAR(TeleportAction) = -1;
GVAR(GhostAction) = -1;
GVAR(ModerationAction) = -1;

GVAR(SideMarkersOnly) = -1;
GVAR(GroupMarkersOnly) = -1;
GVAR(MarkersForLeaderOnly) = -1;

if (isServer) then {
	GVAR(PlayerIndex) = [];
	GVAR(PlayerInfo) = [];
	GVAR(OnPlayerConnectedEventId) = ["MSO_AA_ID", "onPlayerConnected", {[_id,_name,_uid] call FUNC(opc);}] call BIS_fnc_addStackedEventHandler;
	GVAR(OnPlayerDisconnectedEventId) = ["MSO_AA_ID", "onPlayerDisconnected", {[_id,_name,_uid] call FUNC(opd);}] call BIS_fnc_addStackedEventHandler;
	TRACE_2("Added onPlayer Events",GVAR(OnPlayerConnectedEventId),GVAR(OnPlayerDisconnectedEventId));
} else {
	if (isnil QGVAR(PlayerIndex)) then { GVAR(PlayerIndex) = []; };
	if (isnil QGVAR(PlayerInfo)) then { GVAR(PlayerInfo) = []; };
};

INIT_DEBUG(0);

TRACE("End");
TMFPROFILERSTOP;
